﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />

<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/inform.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/Homepage/style.css"/>
<script  type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
$(function(){
  $(document).keypress(function(e) { 
    // 回车键事件 
	 if(e.which == 13) { 
	 $('.sumbit').trigger("click") ;
		   } 
   }); 
$('.sumbit').click(function(){
	username = $('.userid').val();
	psw = $('.psw').val();
	if(username=='用户ID'){
		alert("请输入您的用户ID");
		return false;
	}else if(psw==''){
		alert("请输入您的密码");
		return false;	
	}
	$.ajax({
	 type: "POST",
	 url: "{:U('oper')}",
	 data: {username:username,psw:psw},
	 dataType: "json",
	 success: function(data){
		if(data==1){
			message = "不存在该用户ID";
			 alert(message);
		}else if(data==2){
			message = "密码错误";
			 alert(message);
		}else if(data==3){
			window.location.href="{:U('Center/index?hmenu=4')}"
		}
		
							}
	})	
})

})
</script>
</head>



<body>
<div class="home_menu">
	<include file="Public:home_header" />	<div class="main">
		<div class="login_wrap">
			<div class="login_main">
				<form>
					<ul class="login_ul">
						<li class="title">{:C('title')}用户登陆</li>
						<li class="username"><input type="text"  name="username" class='userid' value="用户ID" onfocus="if(this.value!=''&&this.value=='用户ID'){this.value=''}" onblur="if(this.value==''){this.value='用户ID'}" /></li>
						<li class="password"><input type="password" name="password" class="psw"  id="password" onfocus="this.style.backgroundImage='none'" onblur="if(this.value==''){this.style.backgroundImage='url(__PUBLIC__/img/pwtx.jpg)'}"/></li>
						<li class="sumbit"></li>
						<li class="warn"><a class="reg">立即注册</a><a class="forget">忘记密码?</a></li>
					</ul>
				</form>
			
			</div>
		
		</div>	</div>
	 <include file="Public:home_footer" />
</div>









</body>

</html>